@model IEnumerable<CleverCMS.Cms.Data.Entities.CmsMenuItem>

@section TitleContent
{
   Edit Menu
}

@section NavigationLink
{
   <article class="breadcrumbs"><a class="current" href="/admin/Dashboard/">Website Admin</a><div class="breadcrumb_divider"></div> <a class="current">Edit menu</a></article>
}

<span style="display: none" id="successDeleteResult"><h4 class="alert_success">Items was successfully deleted</h4></span>
<span style="display: none" id="errorResult"><h4 class="alert_error">Error</h4></span>
    <article class="module width_full">
        <header><h3>Add menu</h3></header>
		    <div class="module_content">
			    <a href="/admin/menuitem/edit/" class="oBtn oBtnPrimary oBtnInline" ><span class="alt_btn">Create</span></a>
            </div>
    </article>
    <div class="clear"></div>

   <article class="module width_full">
    <div id="MenuItemsContainer">
    </div>
</article>

<script type="text/javascript">
    $(document).ready(function () {
        $('#MenuItemsContainer').jtable({
            title: 'Pages List',
            paging: true,
            pageSize: 12,
            sorting: true,
            redirect: true,
            defaultSorting: 'Name ASC',
            actions: {
                listAction: '/Admin/MenuItem/ListMenuItems/3',
                updateAction: '/Admin/MenuItem/Edit',
                deleteAction: '/Admin/MenuItem/Delete'
            },
            fields: {
                Id: {
                    key: true,
                    create: false,
                    edit: false,
                    list: true,
                    width: '5%'
                },
                Title: {
                    title: 'Name',
                    width: '90%'
                }
            }
        });
        
        $('#MenuItemsContainer').jtable('load');
    });
</script>